package com.step.scene.light;

import javax.microedition.khronos.opengles.GL10;

import com.step.mesh.Color;

/**
 * 环境光
 * @author heop
 *
 */
public class AmbientLight {
	Color color = new Color(0.2f, 0.2f, 0.2f, 1f);
	public AmbientLight(float r, float g, float b, float a){
		color.set(r, g, b, a);
	}
	
	public void setColor(float r, float g, float b, float a) {
		color.set(r, g, b, a);
	}
	
	public void enable(GL10 gl) {
		gl.glLightModelfv(GL10.GL_LIGHT_MODEL_AMBIENT, color.toArray(), 0);
	}
}
